import Vue from 'vue'
import App from './App.vue'
// import App from '@/layout/component/middle-content.vue'
import router from './router'
import store from './store'

// 引入element-ui
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// 工具函数挂载全局
import * as utils from './utils/index'
// 引入公共样式
import '@/assets/style/reset.css'
import '@/assets/style/public.css'
// 引入富文本编辑器样式
import '@wangeditor/editor/dist/css/style.css'
// 引入全局组件文件
import components from './components'
// 引入权限控制
import './permission'

// 引入日历组件
import FunctionalCalendar from 'vue-functional-calendar'

// 引入全局过滤器
import * as filters from '@/filters'
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

Vue.prototype.$utils = utils
Vue.use(ElementUI)
Vue.use(components)

Vue.use(FunctionalCalendar, {
  dayNames: ['一', '二', '三', '四', '五', '六', '天']
})
